package com.auto.survey.activity.config.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey

@Entity(
    tableName = "point_config_table",
    foreignKeys = [
        ForeignKey(
            entity = ConfigBean::class,
            parentColumns = ["id"],
            childColumns = ["configId"],
            onDelete = ForeignKey.CASCADE
        )
                  ],
    indices = [Index("configId")]
)
data class PointConfig(
    @PrimaryKey(autoGenerate = true) val pointId: Int = 0,
    val configId: Int, // 关联主配置的外键
    var point_x_data:Double,//测点坐标x
    var point_y_data:Double,//测点坐标y
    var point_z_data:Double,//测点坐标z
    var point_mirr_h:Double,//棱镜高
    var point_mirr_num:Long, //棱镜编号
    var point_name:String,  //测点名称
    // 添加顺序字段
    var position: Int = 0  // 用于保存元素在列表中的位置
)
